#ifndef _RSBITMAP_H_H_
#define _RSBITMAP_H_H_

#include <windows.h>
#include <string>

using namespace std;

class RSBITMAP
{
public:
	BYTE *m_arr;
	string m_bitmapName;
	volatile UINT m_blockNum,m_finishNum,m_zeroNum,m_priorPos;
	CRITICAL_SECTION m_cs;
	volatile bool m_change;

public:
	RSBITMAP();
	~RSBITMAP();

	bool Init(string &bitmapName,UINT blockNum);
	
	UCHAR Get(UINT block);
	void Set(UINT block);
	
	bool Read();
	bool Write();

	void MoveNextPos();
	UINT GetPos();
	void SetPos(UINT pos);
};

#endif